<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%bulletin}}".
 *
 * @property int $id
 * @property string|null $title 标题
 * @property int|null $sort 排序
 * @property int|null $status 状态
 * @property string|null $create_time 创建时间
 * @property string|null $update_time 修改时间
 */
class Bulletin extends BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%bulletin}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['title'], 'required'],
            [['sort', 'status'], 'integer'],
            [['create_time', 'update_time'], 'safe'],
            [['title','create_user','update_user'], 'string', 'max' => 255],
            ['sort', 'default', 'value' => 0],
            ['content','string']
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'title' => '标题',
            'sort' => '排序',
            'status' => '状态',
            'create_time' => '创建时间',
            'create_user' => '创建人',
            'update_time' => '修改时间',
            'update_user' => '修改人',
            'content' => '详情',
        ];
    }
}
